import request from '@/utils/request'

// 查询活动记录列表(分页)
export function pageActivityLog (query) {
  return request({
    url: '/system/activityLog/page',
    method: 'get',
    params: query
  })
}
// 查询活动记录列表
export function listActivityLog (query) {
  return request({
    url: '/system/activityLog/list',
    method: 'get',
    params: query
  })
}

// 查询活动列表
export function listActivity (query) {
  return request({
    url: '/system/activityLog/activityList',
    method: 'get',
    params: query
  })
}

// 查询用户徽章列表
export function listUser (query) {
  return request({
    url: '/system/userBadge/userList',
    method: 'get',
    params: query
  })
}

// 查询活动记录详细
export function getActivityLog (id) {
  const params = {
    'id': id
  }
  return request({
    url: '/system/activityLog/getInfo',
    method: 'get',
    params: params
  })
}

// 新增活动记录
export function addActivityLog (data) {
  return request({
    url: '/system/activityLog/insert',
    method: 'post',
    data: data
  })
}

// 修改活动记录
export function updateActivityLog (data) {
  return request({
    url: '/system/activityLog/update',
    method: 'post',
    data: data
  })
}

// 删除活动记录
export function delActivityLog (id) {
  const params = {
    'id': id
  }
  return request({
    url: '/system/activityLog/delete',
    method: 'post',
    params: params
  })
}
// 批量删除活动记录
export function delBatchActivityLog (ids) {
  const params = {
    'ids': ids
  }
  return request({
    url: '/system/activityLog/deleteBatch',
    method: 'post',
    params: params
  })
}

// 导入活动记录
export function importData (data) {
  return request({
    url: '/system/activityLog/importData',
    method: 'post',
    data: data
  })
}
